from HttpCode import HttpState


class ResponseResult:
    def __init__(self, message=None, code=None, data=None):
        self.__message = message
        self.__code = code
        self.__data = data

    def setMessage(self, message):
        self.__message = message

    def getMessage(self):
        return self.__message

    def setCode(self, code):
        self.__code = code

    def getCode(self):
        return self.__code

    def setData(self, data):
        self.__data = data

    def getData(self):
        return self.__data

    def toDict(self):
        return {"message": self.__message, "code": self.__code, "data": self.__data}


if __name__ == "__main__":
    result = ResponseResult("hello", HttpState.OK.value, {"abc": 222})
